/*
 * OpenGLForm.h
 *
 *  Created on: 9 nov. 2011
 *      Author: eschmidmeier
 */

#ifndef OPENGLFORM_H_
#	define OPENGLFORM_H_

#include <FBase.h>
#include <FUi.h>
#include <FGraphics.h>
#include <FGraphicsOpengl2.h>

class OpenGLForm: public Osp::Ui::Controls::Form
    {
public:
    OpenGLForm();
    virtual ~OpenGLForm();

    result Construct();
    result OnInitializing(void);

    bool InitEGL();
    void DestroyGL();

    virtual result OnDraw(void);
private:
    Osp::Graphics::Opengl::EGLDisplay eglDisplay_; // encapsulates all system dependecies for interfacing with local windowing system
    Osp::Graphics::Opengl::EGLSurface eglSurface_;
    Osp::Graphics::Opengl::EGLConfig eglConfig_;
    Osp::Graphics::Opengl::EGLContext eglContext_;
    };

#endif /* OPENGLFORM_H_ */
